﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ArchitectingInnovation.PRISMvvM.Core.Caching
{
    public class CacheItem<T> 
    {
        private readonly T _item;

        public CacheItem(T item)
        {
            this._item = item;
        }

        public T Item
        {
            get { return _item; }
        }


        public override bool Equals(object obj)
        {
            var item = obj as CacheItem<T>;
            if(item == null)
                return base.Equals(obj);
            return this.Item.Equals(item.Item);
        }

        public override int GetHashCode()
        {
            return this.Item.GetHashCode();
        }
    }
}
